import { App } from 'vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

export default function install(app: App) {
  app.use(ElementPlus, { locale: zhCn, size: 'small', zIndex: 3000 })
  // 统一注册el-icon图标
  const _ElIconModules: any = ElementPlusIconsVue
  for (let iconName in _ElIconModules) {
    //console.log(iconName)
    app.component(iconName, _ElIconModules[iconName])
  }
}
